package com.yuyu.shop.remote;

import com.yuyu.commons.interceptor.response.ResponseJson;
import com.yuyu.shop.api.apimodel.order.vo.OrderInfoVO;
import com.yuyu.shop.remote.fallback.OrderServiceFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import javax.validation.constraints.NotNull;

/**
 * @author
 * @description:
 * @date: 2022/9/28 16:57
 */
@FeignClient(path = "/order",value = "order-service",fallbackFactory = OrderServiceFallBackFactory.class)
public interface IOrderServiceMicroService {

    @GetMapping("/queryByOrderId")
    ResponseJson<OrderInfoVO> queryOrderByOrderId(@NotNull(message = "订单Id不能为空") @RequestParam("orderId") String orderId);
}
